package com.android.telephonecall.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.android.telephonecall.service.MainService;

public class BootReceiver extends BroadcastReceiver {

    private static final String TAG = "BootReceiver";

    @Override
    public void onReceive(Context context, Intent intent) {
        //启动监听录音服务
        String action = intent.getAction();
        if (action == null) return;

        Log.d(TAG, "onReceive action: " + action);
        //启动当前应用
        context.startService(new Intent(context, MainService.class));

    }
}
